.class Les/ek$b;
.super Ljava/lang/Object;
.source "TTAdProvider.java"

# interfaces
.implements Lcom/bytedance/sdk/openadsdk/TTAdNative$FeedAdListener;


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Les/ek;->a(Landroid/content/Context;Landroid/view/ViewGroup;Lcom/estrongs/android/pop/app/ad/cn/AdType;Lcom/estrongs/android/pop/app/ad/cn/b;)V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic a:Lcom/estrongs/android/pop/app/ad/cn/AdType;

.field final synthetic b:Lcom/estrongs/android/pop/app/ad/cn/b;

.field final synthetic c:Landroid/content/Context;

.field final synthetic d:Landroid/view/ViewGroup;

.field final synthetic e:Les/ek;


# direct methods
.method constructor <init>(Les/ek;Lcom/estrongs/android/pop/app/ad/cn/AdType;Lcom/estrongs/android/pop/app/ad/cn/b;Landroid/content/Context;Landroid/view/ViewGroup;)V
    .locals 0

    .line 1
    iput-object p1, p0, Les/ek$b;->e:Les/ek;

    iput-object p2, p0, Les/ek$b;->a:Lcom/estrongs/android/pop/app/ad/cn/AdType;

    iput-object p3, p0, Les/ek$b;->b:Lcom/estrongs/android/pop/app/ad/cn/b;

    iput-object p4, p0, Les/ek$b;->c:Landroid/content/Context;

    iput-object p5, p0, Les/ek$b;->d:Landroid/view/ViewGroup;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public synthetic a(Landroid/view/ViewGroup;Lcom/estrongs/android/pop/app/ad/cn/AdType;Lcom/estrongs/android/pop/app/ad/cn/b;Landroid/view/View;)V
    .locals 0

    .line 1
    invoke-virtual {p1}, Landroid/view/ViewGroup;->getChildCount()I

    move-result p4

    if-lez p4, :cond_0

    .line 2
    invoke-virtual {p1}, Landroid/view/ViewGroup;->removeAllViews()V

    const/16 p4, 0x8

    .line 3
    invoke-virtual {p1, p4}, Landroid/view/ViewGroup;->setVisibility(I)V

    .line 4
    :cond_0
    iget-object p1, p0, Les/ek$b;->e:Les/ek;

    invoke-virtual {p1, p2, p3}, Les/bk;->b(Lcom/estrongs/android/pop/app/ad/cn/AdType;Lcom/estrongs/android/pop/app/ad/cn/b;)V

    return-void
.end method

.method public onError(ILjava/lang/String;)V
    .locals 5

    .line 1
    iget-object v0, p0, Les/ek$b;->e:Les/ek;

    iget-object v1, p0, Les/ek$b;->a:Lcom/estrongs/android/pop/app/ad/cn/AdType;

    iget-object v2, p0, Les/ek$b;->b:Lcom/estrongs/android/pop/app/ad/cn/b;

    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    const-string v4, "tt-native "

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v3, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p2

    invoke-virtual {v0, v1, v2, p1, p2}, Les/bk;->a(Lcom/estrongs/android/pop/app/ad/cn/AdType;Lcom/estrongs/android/pop/app/ad/cn/b;ILjava/lang/String;)V

    return-void
.end method

.method public onFeedAdLoad(Ljava/util/List;)V
    .locals 13
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/List<",
            "Lcom/bytedance/sdk/openadsdk/TTFeedAd;",
            ">;)V"
        }
    .end annotation

    const-string v0, "AdManager"

    const-string v1, "TT onFeedAdLoad"

    .line 1
    invoke-static {v0, v1}, Lcom/estrongs/android/util/n;->a(Ljava/lang/String;Ljava/lang/String;)V

    const/4 v1, -0x1

    if-eqz p1, :cond_c

    .line 2
    invoke-interface {p1}, Ljava/util/List;->isEmpty()Z

    move-result v2

    if-eqz v2, :cond_0

    goto/16 :goto_4

    :cond_0
    const/4 v2, 0x0

    .line 3
    invoke-interface {p1, v2}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object p1

    check-cast p1, Lcom/bytedance/sdk/openadsdk/TTFeedAd;

    .line 4
    iget-object v3, p0, Les/ek$b;->c:Landroid/content/Context;

    instance-of v4, v3, Landroid/app/Activity;

    if-eqz v4, :cond_1

    .line 5
    check-cast v3, Landroid/app/Activity;

    invoke-interface {p1, v3}, Lcom/bytedance/sdk/openadsdk/TTNativeAd;->setActivityForDownloadApp(Landroid/app/Activity;)V

    goto :goto_0

    .line 6
    :cond_1
    invoke-static {}, Lcom/estrongs/android/pop/view/FileExplorerActivity;->a1()Lcom/estrongs/android/pop/view/FileExplorerActivity;

    move-result-object v3

    invoke-interface {p1, v3}, Lcom/bytedance/sdk/openadsdk/TTNativeAd;->setActivityForDownloadApp(Landroid/app/Activity;)V

    .line 7
    :goto_0
    iget-object v3, p0, Les/ek$b;->e:Les/ek;

    iget-object v4, p0, Les/ek$b;->c:Landroid/content/Context;

    iget-object v5, p0, Les/ek$b;->d:Landroid/view/ViewGroup;

    invoke-static {v3, v4, v5, p1}, Les/ek;->a(Les/ek;Landroid/content/Context;Landroid/view/ViewGroup;Lcom/bytedance/sdk/openadsdk/TTFeedAd;)Landroid/view/View;

    move-result-object v3

    if-nez v3, :cond_2

    .line 8
    iget-object p1, p0, Les/ek$b;->e:Les/ek;

    iget-object v0, p0, Les/ek$b;->a:Lcom/estrongs/android/pop/app/ad/cn/AdType;

    iget-object v2, p0, Les/ek$b;->b:Lcom/estrongs/android/pop/app/ad/cn/b;

    const-string v3, "tt-native ad view failed"

    invoke-virtual {p1, v0, v2, v1, v3}, Les/bk;->a(Lcom/estrongs/android/pop/app/ad/cn/AdType;Lcom/estrongs/android/pop/app/ad/cn/b;ILjava/lang/String;)V

    return-void

    :cond_2
    const v1, 0x7f090cdc

    .line 9
    invoke-virtual {v3, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/TextView;

    const v4, 0x7f090cdb

    .line 10
    invoke-virtual {v3, v4}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v4

    check-cast v4, Landroid/widget/TextView;

    const v5, 0x7f090cda

    .line 11
    invoke-virtual {v3, v5}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v5

    check-cast v5, Landroid/widget/TextView;

    const v6, 0x7f0905c0

    .line 12
    invoke-virtual {v3, v6}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v6

    check-cast v6, Landroid/widget/ImageView;

    const v7, 0x7f0905bf

    .line 13
    invoke-virtual {v3, v7}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v7

    check-cast v7, Landroid/widget/ImageView;

    const v8, 0x7f0901b2

    .line 14
    invoke-virtual {v3, v8}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v8

    check-cast v8, Landroid/widget/Button;

    .line 15
    iget-object v9, p0, Les/ek$b;->d:Landroid/view/ViewGroup;

    iget-object v10, p0, Les/ek$b;->a:Lcom/estrongs/android/pop/app/ad/cn/AdType;

    iget-object v11, p0, Les/ek$b;->b:Lcom/estrongs/android/pop/app/ad/cn/b;

    new-instance v12, Les/zj;

    invoke-direct {v12, p0, v9, v10, v11}, Les/zj;-><init>(Les/ek$b;Landroid/view/ViewGroup;Lcom/estrongs/android/pop/app/ad/cn/AdType;Lcom/estrongs/android/pop/app/ad/cn/b;)V

    invoke-virtual {v7, v12}, Landroid/widget/ImageView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 16
    iget-object v7, p0, Les/ek$b;->d:Landroid/view/ViewGroup;

    invoke-virtual {v7}, Landroid/view/ViewGroup;->getVisibility()I

    move-result v7

    if-eqz v7, :cond_3

    .line 17
    iget-object v7, p0, Les/ek$b;->d:Landroid/view/ViewGroup;

    invoke-virtual {v7, v2}, Landroid/view/ViewGroup;->setVisibility(I)V

    .line 18
    :cond_3
    iget-object v7, p0, Les/ek$b;->d:Landroid/view/ViewGroup;

    invoke-virtual {v7}, Landroid/view/ViewGroup;->getChildCount()I

    move-result v7

    if-lez v7, :cond_4

    .line 19
    iget-object v7, p0, Les/ek$b;->d:Landroid/view/ViewGroup;

    invoke-virtual {v7}, Landroid/view/ViewGroup;->removeAllViews()V

    .line 20
    :cond_4
    invoke-virtual {v3}, Landroid/view/View;->getParent()Landroid/view/ViewParent;

    move-result-object v7

    if-eqz v7, :cond_5

    .line 21
    invoke-virtual {v3}, Landroid/view/View;->getParent()Landroid/view/ViewParent;

    move-result-object v7

    .line 22
    instance-of v9, v7, Landroid/view/ViewGroup;

    if-eqz v9, :cond_5

    .line 23
    check-cast v7, Landroid/view/ViewGroup;

    invoke-virtual {v7}, Landroid/view/ViewGroup;->removeAllViews()V

    .line 24
    :cond_5
    iget-object v7, p0, Les/ek$b;->d:Landroid/view/ViewGroup;

    invoke-virtual {v7, v3}, Landroid/view/ViewGroup;->addView(Landroid/view/View;)V

    const-string v7, "TT addView"

    .line 25
    invoke-static {v0, v7}, Lcom/estrongs/android/util/n;->a(Ljava/lang/String;Ljava/lang/String;)V

    .line 26
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    .line 27
    invoke-interface {v0, v3}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 28
    new-instance v7, Ljava/util/ArrayList;

    invoke-direct {v7}, Ljava/util/ArrayList;-><init>()V

    .line 29
    invoke-interface {v7, v8}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 30
    check-cast v3, Landroid/view/ViewGroup;

    new-instance v9, Les/ek$b$a;

    invoke-direct {v9, p0}, Les/ek$b$a;-><init>(Les/ek$b;)V

    invoke-interface {p1, v3, v0, v7, v9}, Lcom/bytedance/sdk/openadsdk/TTNativeAd;->registerViewForInteraction(Landroid/view/ViewGroup;Ljava/util/List;Ljava/util/List;Lcom/bytedance/sdk/openadsdk/TTNativeAd$AdInteractionListener;)V

    .line 31
    invoke-interface {p1}, Lcom/bytedance/sdk/openadsdk/TTNativeAd;->getTitle()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v1, v0}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 32
    invoke-interface {p1}, Lcom/bytedance/sdk/openadsdk/TTNativeAd;->getDescription()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v5, v0}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 33
    invoke-interface {p1}, Lcom/bytedance/sdk/openadsdk/TTNativeAd;->getSource()Ljava/lang/String;

    move-result-object v0

    if-nez v0, :cond_6

    const-string v0, "\u5e7f\u544a\u6765\u6e90"

    goto :goto_1

    :cond_6
    invoke-interface {p1}, Lcom/bytedance/sdk/openadsdk/TTNativeAd;->getSource()Ljava/lang/String;

    move-result-object v0

    :goto_1
    invoke-virtual {v4, v0}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 34
    invoke-interface {p1}, Lcom/bytedance/sdk/openadsdk/TTNativeAd;->getIcon()Lcom/bytedance/sdk/openadsdk/TTImage;

    move-result-object v0

    if-eqz v0, :cond_7

    .line 35
    invoke-virtual {v0}, Lcom/bytedance/sdk/openadsdk/TTImage;->isValid()Z

    move-result v1

    if-eqz v1, :cond_7

    .line 36
    iget-object v1, p0, Les/ek$b;->c:Landroid/content/Context;

    invoke-static {v1}, Lcom/bumptech/glide/c;->d(Landroid/content/Context;)Lcom/bumptech/glide/h;

    move-result-object v1

    invoke-virtual {v0}, Lcom/bytedance/sdk/openadsdk/TTImage;->getImageUrl()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v1, v0}, Lcom/bumptech/glide/h;->a(Ljava/lang/String;)Lcom/bumptech/glide/g;

    move-result-object v0

    invoke-virtual {v0, v6}, Lcom/bumptech/glide/g;->a(Landroid/widget/ImageView;)Les/w3;

    .line 37
    :cond_7
    invoke-interface {p1}, Lcom/bytedance/sdk/openadsdk/TTNativeAd;->getInteractionType()I

    move-result v0

    const/4 v1, 0x2

    if-eq v0, v1, :cond_b

    const/4 v1, 0x3

    if-eq v0, v1, :cond_b

    const/4 v1, 0x4

    if-eq v0, v1, :cond_9

    const/4 p1, 0x5

    if-eq v0, p1, :cond_8

    const/16 p1, 0x8

    .line 38
    invoke-virtual {v8, p1}, Landroid/widget/Button;->setVisibility(I)V

    goto :goto_3

    .line 39
    :cond_8
    invoke-virtual {v8, v2}, Landroid/widget/Button;->setVisibility(I)V

    const-string p1, "\u7acb\u5373\u62e8\u6253"

    .line 40
    invoke-virtual {v8, p1}, Landroid/widget/Button;->setText(Ljava/lang/CharSequence;)V

    goto :goto_3

    .line 41
    :cond_9
    iget-object v0, p0, Les/ek$b;->c:Landroid/content/Context;

    instance-of v1, v0, Landroid/app/Activity;

    if-eqz v1, :cond_a

    .line 42
    check-cast v0, Landroid/app/Activity;

    invoke-interface {p1, v0}, Lcom/bytedance/sdk/openadsdk/TTNativeAd;->setActivityForDownloadApp(Landroid/app/Activity;)V

    goto :goto_2

    .line 43
    :cond_a
    invoke-static {}, Lcom/estrongs/android/pop/view/FileExplorerActivity;->a1()Lcom/estrongs/android/pop/view/FileExplorerActivity;

    move-result-object v0

    invoke-interface {p1, v0}, Lcom/bytedance/sdk/openadsdk/TTNativeAd;->setActivityForDownloadApp(Landroid/app/Activity;)V

    .line 44
    :goto_2
    invoke-virtual {v8, v2}, Landroid/widget/Button;->setVisibility(I)V

    .line 45
    iget-object v0, p0, Les/ek$b;->e:Les/ek;

    invoke-static {v0, v8, p1}, Les/ek;->a(Les/ek;Landroid/widget/Button;Lcom/bytedance/sdk/openadsdk/TTFeedAd;)V

    goto :goto_3

    .line 46
    :cond_b
    invoke-virtual {v8, v2}, Landroid/widget/Button;->setVisibility(I)V

    const-string p1, "\u67e5\u770b\u8be6\u60c5"

    .line 47
    invoke-virtual {v8, p1}, Landroid/widget/Button;->setText(Ljava/lang/CharSequence;)V

    :goto_3
    return-void

    .line 48
    :cond_c
    :goto_4
    iget-object p1, p0, Les/ek$b;->e:Les/ek;

    iget-object v0, p0, Les/ek$b;->a:Lcom/estrongs/android/pop/app/ad/cn/AdType;

    iget-object v2, p0, Les/ek$b;->b:Lcom/estrongs/android/pop/app/ad/cn/b;

    const-string v3, "tt-native no ad"

    invoke-virtual {p1, v0, v2, v1, v3}, Les/bk;->a(Lcom/estrongs/android/pop/app/ad/cn/AdType;Lcom/estrongs/android/pop/app/ad/cn/b;ILjava/lang/String;)V

    return-void
.end method
